<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改走访地址簿')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-address-edit" th:object="${baseAddress}">
            <input name="dzbm" th:field="*{dzbm}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否有房屋：</label>
                <div class="col-sm-8">
                    <input name="havefw" th:field="*{havefw}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">类型：</label>
                <div class="col-sm-8">
                    <input name="zdlx" th:field="*{zdlx}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">人员信息：</label>
                <div class="col-sm-8">
                    <input name="ryxx" th:field="*{ryxx}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">单位信息：</label>
                <div class="col-sm-8">
                    <input name="dwxx" th:field="*{dwxx}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">更新时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="gxsj" th:value="${#dates.format(baseAddress.gxsj, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">地址名称：</label>
                <div class="col-sm-8">
                    <input name="dzmc" th:field="*{dzmc}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">所属市局：</label>
                <div class="col-sm-8">
                    <input name="sssj" th:field="*{sssj}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">所属分局：</label>
                <div class="col-sm-8">
                    <input name="ssfj" th:field="*{ssfj}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">所属派出所：</label>
                <div class="col-sm-8">
                    <input name="sspcs" th:field="*{sspcs}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">所属警务区：</label>
                <div class="col-sm-8">
                    <input name="ssjwq" th:field="*{ssjwq}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">地址元素类型：</label>
                <div class="col-sm-8">
                    <input name="dzlx" th:field="*{dzlx}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">所属街路巷：</label>
                <div class="col-sm-8">
                    <input name="ssjlxxqDzbm" th:field="*{ssjlxxqDzbm}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">登记时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="cjsj" th:value="${#dates.format(baseAddress.cjsj, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">撤销时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="cxsj" th:value="${#dates.format(baseAddress.cxsj, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "control/address";
        $("#form-address-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-address-edit').serialize());
            }
        }

        $("input[name='gxsj']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='cjsj']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='cxsj']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>